home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 10 / Amoszine 10 (Disk 3 of 3).adf / Amos_Procs.lha / Distance.proc / Distance.amosSourceCode
Encoding:
AMOS Source Code  |  1991-12-03  |  334 b   |  14 lines

  1. Procedure DISTANCE[X1,Y1,X2,Y2]
  2.    ' By John Smit 
  3.    ' Used to find the distance between two X Y points 
  4.    ' Distance returned to the Param veriable
  5.    ' X1 and Y1 are one position - X2 and Y2 are the other 
  6.    X=Abs(X1)-Abs(X2)
  7.    Y=Abs(Y1)-Abs(Y2)
  8.    X3=Sqr((X*X)+(Y*Y))
  9. End Proc[X3]
  10. '
  11. ' example
  12. DISTANCE[1,1,5,10]
  13. X=Param
  14. Print X